package com.gmail.dengtao.joe.group.protocol.impl;

import com.gmail.dengtao.joe.group.protocol.Protocol;
import com.gmail.dengtao.joe.group.protocol.ProtocolParser;

public class HELLOProtocolParser implements ProtocolParser {

	@Override
	public Protocol parse(byte[] data) {
		byte[] bts = data;//SixBitUtils.decode(data);
		String plain = new String(bts);
		String[] params = plain.split("/");
		Protocol protocol = new HELLOProtocol(params[0], Integer.parseInt(params[1]), params[2]);
		return protocol;
	}
	
}